home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / midi / gfft.lha / gfft-2.03 / source / gfft-2.03-source.lha / okrfft.c < prev    next >
C/C++ Source or Header  |  1996-01-02  |  1KB  |  38 lines

  1. /***************************************************************************
  2.  *          Copyright (C) 1994  Charles P. Peterson                  *
  3.  *         4007 Enchanted Sun, San Antonio, Texas 78244-1254             *
  4.  *              Email: Charles_P_Peterson@fcircus.sat.tx.us                *
  5.  *                                                                         *
  6.  *          This is free software with NO WARRANTY.                  *
  7.  *          See gfft.c, or run program itself, for details.              *
  8.  *              Support is available for a fee.                      *
  9.  ***************************************************************************
  10.  *
  11.  * Program:     gfft--General FFT analysis
  12.  * File:        okrfft.c
  13.  * Purpose:     Do an fft on real samples.
  14.  * Author:      Charles Peterson (CPP)
  15.  * History:     16-August-1993 CPP; Created.
  16.  * Comment:
  17.  *    This driver allows the use of one of possibly several available
  18.  *    fft algorithms--for testing or comparison.
  19.  */
  20.  
  21. #include "gfft.h"
  22. #include "complex.h"
  23. #include "settings.h"
  24.  
  25. void ok_rfft (float *indata, unsigned long n)
  26. {
  27. #ifdef NUMERICAL_RECIPES_AVAILABLE
  28.     if (Numerical)
  29.     {
  30.     realft (indata-1, n/2, FORWARD_FFT);  /* NR uses 1-based arrays */
  31.     }
  32.     else
  33. #endif
  34.     {
  35.     rfft ((Complex_float *) indata, n, FORWARD_FFT);
  36.     }
  37. }
  38.